<extend name="./Application/Home/View/Public/layout.html"/>

<block name="style">
    <style type="text/css">
        #my-slider {
            margin-top: -20px;
        }

        /* 产品 */
        @media (min-width: 768px) {
            #product-menu .title {
                margin-top: 20px;
            }
        }
        @media (min-width: 992px) {
            #product-menu .title {
                margin-top: 30px;
            }
        }

        /* 新闻资讯 */
        .news ul li {
            padding: 5px 0;
        }

        /*优势*/
        .advantages img {
            width: 100%;
            margin-bottom: 15px;
        }
        @media (min-width: 768px) {
            .advantages img {
                height: 80px;
            }
        }
        @media (min-width: 992px) {
            .advantages img {
                height: 115px;
            }
        }
        @media (max-width: 768px) {
            .advantages img {
                height: 100px;
            }
        }

        /* 幻灯片 */
        @media (min-width: 992px) {
            .slider-img {
                width: 100%;
                height:500px !important;
            }
        }
        @media (max-width: 992px) {
            .slider-img {
                width: 100%;
                height:300px !important;
            }
        }
        @media (max-width: 768px) {
            .slider-img {
                width: 100%;
                height:200px !important;
            }
        }

        /* 合作伙伴 */
        .partner img {
            width: 100%;
            height:60px;
            margin-bottom:15px;
            border: 1px solid #eee;
        }

        /* 友情链接 */
        .friendly_link {
            min-height: 100px;
            margin-top: 20px;
            margin-bottom: 10px;
        }
        .friendly_link .list-unstyled {
            padding: 10px 0;
        }
        .friendly_link .list-unstyled li a {
            margin-right: 15px;
        }
    </style>
</block>

<block name="jumbotron">
    <div id="my-slider" class="carousel slide" data-ride="carousel" >
        <ol class="carousel-indicators">
            <article:slider_list name="slider" limit="5">
                <li data-target="#my-slider" data-slide-to="{$key}" class=" <php>if($i==1) echo 'active';</php>"></li>
            </article:slider_list>
        </ol>
        <!-- 轮播（Carousel）项目 -->
        <div class="carousel-inner">
            <article:slider_list name="slider" limit="5">
                <div class="item <php>if($i==1) echo 'active';</php>">
                    <a href="{$slider.url}" target="_blank">
                        <img class="slider-img" src="{$slider.cover|get_cover}" alt="{$slider.title}">
                    </a>
                </div>
            </article:slider_list>
            <!-- 如果没有幻灯片 -->
            <?php if(!$slider): ?>
                <div class="item active">
                    <a href="http://www.corethink.cn" target="_blank">
                        <img class="slider-img" src="__HOME_IMG__/index/banner.jpg">
                    </a>
                </div>
            <?php endif; ?>
            <!-- 如果没有幻灯片 -->
        </div>
        <a class="left carousel-control hidden-xs" href="#my-slider" data-slide="prev"><span class="fa fa-chevron-left"></span></a>
        <a class="right carousel-control hidden-xs" href="#my-slider" data-slide="next"><span class="fa fa-chevron-right"></span></a>
    </div>
</block>

<block name="main">
    <div class="container">
        <!-- 资讯 -->
        <div class="row">
            <div class="col-xs-12 col-sm-6 news">
                <h3>新闻资讯 <small>／News</small></h3>
                <ul class="list-unstyled">
                    <article:article_list name="vo" cid="$_index_cate['a']" limit="8">
                        <li>
                            <a class="text-muted" href="{:U('Article/Home/Article/detail', array('id' => $vo['id']))}">
                                <i class="fa {$vo.icon}"></i>
                                <span>{$vo.title|cut_str=0,20}</span>
                                <span class="pull-right visible-lg">{$vo.create_time|time_format}</span>
                            </a>
                        </li>
                    </article:article_list>
                </ul>
            </div>

            <div class="col-xs-12 col-sm-6">
                <h3>资质优势 <small>／Advantages</small></h3>
                <div class="row advantages">
                    <article:article_list name="vo" cid="$_index_cate['a']" limit="4">
                        <div class="col-xs-6 col-sm-6">
                            <div class="media">
                                <a href="{:U('Article/Home/Article/detail', array('id' => $vo['id']))}">
                                    <img class="img-responsive lazy" data-lazy="{$vo.cover|get_cover}" alt="{$vo.title}">
                                </a>
                            </div>
                        </div>
                    </article:article_list>
                </div>
            </div>
        </div>

        <!-- 合作伙伴 -->
        <div class="row partner">
            <div class="col-xs-12 col-sm-12">
                <h3>合作伙伴 <small>／Partner</small></h3>
                <div class="row">
                    <article:friendly_link name="fl2" type="2">
                        <div class="col-xs-4 col-sm-2">
                            <a rel="external nofollow" target="_blank" href="{$fl2.url}">
                                <img class="img-responsive" src="{$fl2.logo|get_cover}">
                            </a>
                        </div>
                    </article:friendly_link>
                </div>
            </div>
        </div>

        <!-- 友情链接 -->
        <div class="row friendly_link">
            <div class="col-xs-12 col-sm-12">
                <h3>友情链接 <small>／Link</small></h3>
                <ul class="list-unstyled list-inline">
                    <article:friendly_link name="fl1" type="1">
                        <li><a rel="external nofollow" target="_blank" href="{$fl1.url}">{$fl1.title}</a></li>
                    </article:friendly_link>
                </ul>
            </div>
        </div>
    </div>
</block>
